package com.shareach.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Update;

import com.shareach.common.BaseQueryOrder;
import com.shareach.common.BizCondition;
import com.shareach.domain.BaseTelephoneDomain;

public interface BaseTelphoneService {
	// add
	Long save(BaseTelephoneDomain domain);

	Long saveOrUpdate(BaseTelephoneDomain domain);

	// del
	void del(BaseTelephoneDomain domain);

	// update
	@Deprecated
	void update(BaseTelephoneDomain domain);
	//
	void updateByCriteria(Criteria criteria, Update update);
	
	// update
	void update(BaseTelephoneDomain domain, BizCondition contition);

	// get by id
	BaseTelephoneDomain getByTel(String city,String number);

	// get list <use reflection-->
	@Deprecated
	List<BaseTelephoneDomain> getList(BaseTelephoneDomain domain);

	// BaseTelephoneDomain getByTel(String number);
	List<BaseTelephoneDomain> getByCriteria(Criteria criteria);
	

	List<BaseTelephoneDomain> getList(BizCondition condition);
	//load page
	Page<BaseTelephoneDomain> getPageResult(BaseTelephoneDomain domain, BaseQueryOrder order);
}
